﻿@model List<LAPI.Data.Model.Pista>
           
<div class="row">
    <h2>Administración de Pistas</h2>
    <h3>Crea, Elimina o Actualiza las pistas de tu centro deportivo... </h3>
</div>
<hr />

<div class="row">
<div id="msg" class="span5"></div> 
</div>

<div class="marketing">

    <div class="row span10">
            @using (Ajax.BeginForm(
                actionName: "Buscar",
                controllerName: "Pista",
                routeValues: null,
                ajaxOptions: new AjaxOptions { HttpMethod = "Post", InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace, UpdateTargetId = "grid"/*, OnFailure = "PostFailure", OnSuccess = "PostSuccess", OnComplete = "PostOnComplete"*/ },
                htmlAttributes: new Dictionary<string, object> { { "class", "well form-inline" } }
            ))
            {    
                <span class="span2">
                    <input type="text" class="input-small span2" placeholder="filtrar por identificador" name="idpistaFilter"/>
                </span>
                
                <span class="span2">
                    <input type="text" class="input-small span2" placeholder="filtrar por nombre de pista" name="descripcionFilter"/>
                </span>

                <span class="span1">
                    <button type="submit" class="btn-mini btn">
                         <i class="icon-search"></i>
                        Filtrar
                    </button>       
                </span>        
            }                        
    </div>
        
    <div class="row span10">
        <a href="@Url.Action(actionName: "Crear", controllerName: "Pista")" class="btn btn-success pull-right">
            <i class="icon-plus"></i>
            Crear nuevo
        </a>     
    </div>

    <div class="row span10" id="grid">
        @Html.Partial("_ListadoPista" , Model)
    </div>

</div>

